package com.client.koshercook.client;

import java.util.LinkedList;
import java.util.List;

import com.google.gwt.user.client.rpc.IsSerializable;

/** use the iterator to get the simpleRecipe objects */
public class ClientResponse implements IsSerializable {

	public List<String> name;
	public List<String> kosher;
	public List<String> type;
	public List<String> link;
	public List<String> alsoNeed;
	
	/*construct a response to the client*/
	public ClientResponse(){
		name = new LinkedList<String>();
		kosher = new LinkedList<String>();
		type = new LinkedList<String>();
		link = new LinkedList<String>();
		alsoNeed = new LinkedList<String>();
	}
	
	public void add(String name, String kosher, String type, String link, String alsoNeed){
		this.name.add(name);
		this.kosher.add(kosher);
		this.type.add(type);
		this.link.add(link);
		this.alsoNeed.add(alsoNeed);
	}
	
	public void clear(){
		name.clear();
		kosher.clear();
		type.clear();
		link.clear();
		alsoNeed.clear();
	}
	
	public int size(){
		return name.size();
	}
	
	public String getName(int index){
		return name.get(index);
	}
	
	public String getKosher(int index){
		return kosher.get(index);
	}
	
	public String getType(int index){
		return type.get(index);
	}
	
	public String getLink(int index){
		return link.get(index);
	}
	
	public String getAlsoNeed(int index){
		return alsoNeed.get(index);
	}
	
}
	

